package com.hertz.appr.service;

import java.util.List;

import com.hertz.appr.oauth.AccessToken;
import com.hertz.appr.oauth.OAuth;
import com.hertz.appr.pojo.db.Robot;
import com.hertz.appr.util.Configuration;

public class RobotGangTestImpl implements IRobotGang {

	private String tokenQQ = Configuration.getProperty(Configuration.QQ_PROVIDER + ".accessToken");
	private String secretQQ = Configuration.getProperty(Configuration.QQ_PROVIDER + ".accessTokenSecret");
	
	private String tokenSina = Configuration.getProperty(Configuration.SINA_PROVIDER + ".accessTokenSecret");
	private String secretSina = Configuration.getProperty(Configuration.SINA_PROVIDER + ".accessTokenSecret");
	@Override
	public void addRobot(Robot robot) {
		// TODO Auto-generated method stub

	}

	@Override
	public OAuth getOauth(String provider, Short type) {
		// TODO Auto-generated method stub
		if(provider.equals(Configuration.QQ_PROVIDER))
			return new OAuth(provider,new AccessToken(tokenQQ,secretQQ));
		else if(provider.equals(Configuration.SINA_PROVIDER)){
			return new OAuth(provider,new AccessToken(tokenSina,secretSina));
		}else
			return null;
	}

	@Override
	public OAuth getOauth(String provider, Robot robot) {
		// TODO Auto-generated method stub
		return getOauth(provider, Short.valueOf("0"));
	}

	@Override
	public Robot getRobot(List<Robot> list, Short type) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Robot> getRobots(String provider, Short type) {
		// TODO Auto-generated method stub
		return null;
	}

}
